-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Python] BigQuery handler for enrichment transform #31295
Conversation
0964fce
to
78c8f29
Compare
78c8f29
to
a1ae5d1
Compare
R: @damccorm |
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, had some minor comments
sdks/python/apache_beam/transforms/enrichment_handlers/bigquery.py
Outdated
Show resolved
Hide resolved
sdks/python/apache_beam/transforms/enrichment_handlers/bigquery.py
Outdated
Show resolved
Hide resolved
sdks/python/apache_beam/transforms/enrichment_handlers/bigquery.py
Outdated
Show resolved
Hide resolved
sdks/python/apache_beam/transforms/enrichment_handlers/bigquery.py
Outdated
Show resolved
Hide resolved
Thanks for the review! Made the suggested changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM once checks pass, thanks!
Implemented the BigQuery handler for Enrichment transform.
To use this handler you need either of the following combinations:
table_name
,row_restriction_template
,fields
table_name
,row_restriction_template
,condition_value_fn
query_fn
In addition to this, batch size can be specified with
min_batch_size
andmax_batch_size
. These are passed to theBatchElements
transform just before making calls to BigQuery. This helps reducing the cost on the BigQuery side.By default, the handler pulls all columns from the BigQuery table. To override this, use the
column_name
parameter to specify a list of column names to fetch.The user interface here is pretty similar to
TableReadOptions
.Example Usage:
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
addresses #123
), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, commentfixes #<ISSUE NUMBER>
instead.CHANGES.md
with noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.